package com.al.dao;

import java.sql.SQLException;

import com.al.db.DBHelper;

public class RegisterDao {

	public int save(String name, String password) {
		DBHelper db = new DBHelper();
		String sql = "insert into users(username,userpass) values(?,?)";
		try {
			return db.executeUpdate(sql, name,password);
		} catch (ClassNotFoundException | SQLException e) {
			e.printStackTrace();
		}
		return 0;
	}

}
